From 76c86a2924a69b510ef0708cf172c2b4d0bc6e0a Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Wed, 7 Sep 2005 13:41:49 +0000 Subject: [PATCH] Trigger domain cleanup on @releaseDomain watch-event instead of domain exc. virq. Signed-off-by: Christian Limpach --- tools/python/xen/xend/XendDomain.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 3b32b707cb..41ed62e263 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -67,7 +67,7 @@ class XendDomain: xroot.add_component("xen.xend.XendDomain", self) self.domains = XendDomainDict() self.dbmap = DBMap(db=XenNode("/domain")) - eserver.subscribe('xend.virq', self.onVirq) + self.watchReleaseDomain() self.initial_refresh() def list(self): @@ -95,11 +95,13 @@ class XendDomain: doms = self.list_sorted() return map(lambda x: x.name, doms) - def onVirq(self, event, val): - """Event handler for virq. - """ + def onReleaseDomain(self): self.refresh(cleanup=True) + def watchReleaseDomain(self): + from xen.xend.xenstore.xswatch import xswatch + self.releaseDomain = xswatch("@releaseDomain", self.onReleaseDomain) + def xen_domains(self): """Get table of domains indexed by id from xc. """ -- 2.30.2